package sk.tuke.utils;

import java.util.List;
import java.util.Set;
import java.util.TreeSet;

import org.springframework.util.Assert;

public class Utils {

	public static void checkObjectToNull(String[] elements, Object... input) {
		for (int i = 0; i < input.length; i++) {
			Assert.notNull(input[i], "Input object [" + elements[i] + "] must not be null.");
		}
	}

	public static <T> Set<T> convertListToSet(List<T> list) {
		Set<T> set = new TreeSet<T>();
		for (T object : list) {
			set.add(object);
		}
		return set;
	}

}
